package com.zd.dao;

import com.zd.entity.Topic;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TopicDao extends CrudRepository<Topic, Long> {

    /**
     * 查询所有主题
     * @return
     */
    public List<Topic> getAllBy();

    /**
     * 根据主题id查询
     * @param tid
     * @return
     */
    Topic queryTopicByTid(Long tid);

    Topic queryTopicByTname(String tname);


}